package main

import (
	"fmt"
	"os"
)

func main() {
	fmt.Println("-----------------------------------------------")
	file, err := os.Open("./readme.md")
	defer func(file *os.File) {
		err := file.Close()
		if err != nil {
			fmt.Println("1", err)
		}
	}(file)

	if err != nil {
		fmt.Println("2", err)
		return
	}
	fmt.Println("3", file)
	var bytes []byte = make([]byte, 128)
	for {
		_, err1 := file.Read(bytes)
		if err1 != nil {
			fmt.Println("4", err1)
			return
		}
	}

	fmt.Println(string(bytes))
}
